import request from '@/utils/request'

// 查询派出单位用户列表
export function listUserCompany(query) {
  return request({
    url: '/grant/userCompany/list',
    method: 'get',
    params: query
  })
}

// 查询派出单位用户详细
export function getUserCompany(id) {
  return request({
    url: '/grant/userCompany/' + id,
    method: 'get'
  })
}

// 新增派出单位用户
export function addUserCompany(data) {
  return request({
    url: '/grant/userCompany',
    method: 'post',
    data: data
  })
}

// 修改派出单位用户
export function updateUserCompany(data) {
  return request({
    url: '/grant/userCompany',
    method: 'put',
    data: data
  })
}

// 删除派出单位用户
export function delUserCompany(id) {
  return request({
    url: '/grant/userCompany/' + id,
    method: 'delete'
  })
}

// 导出派出单位用户
export function exportUserCompany(query) {
  return request({
    url: '/grant/userCompany/export',
    method: 'get',
    params: query
  })
}